import request from "@/config/utils/request";
import { loadingParams, pageLoadingParams } from "@/basa/utils/public";

// 列表查询
export function getList(data) {
  return request({
    url: "/apis/smp/smpinventory/listPageInventory",
    method: "POST",
    data: { ...data, ...pageLoadingParams },
  });
}
// 撤回
export function revokeSmpContractCreation(data) {
  return request({
    url: "/apis/smp/smpinventory/recallInventory",
    method: "POST",
    data: { ...data, ...loadingParams, loadingMessage: "撤回中,请稍等..." },
  });
}

// 删除
export function removeSmpContractCreation(data) {
  return request({
    url: "/apis/smp/smpinventory/removeInventory",
    method: "POST",
    data: { ...data, ...loadingParams, loadingMessage: "删除中,请稍等..." },
  });
}

// 暂存
export function tsInventory(data) {
  return request({
    url: "/apis/smp/smpinventory/tsInventory",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}

// 选择库存
export function listSmpStockForInventoryPage(data) {
  return request({
    url: "/apis/smp/smpstock/listSmpStockForInventoryPage",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}
// 盘0库存
export function listPageInventoryZero(data) {
  return request({
    url: "/apis/smp/smpstock/listPageInventoryZero",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}
// 查询盘点单详情
export function getInventory(data) {
  return request({
    url: "/apis/smp/smpinventory/getInventory",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}
// 盘点单保存
export function savInventory(data) {
  return request({
    url: "/apis/smp/smpinventory/saveInventory",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}
// 盘点单编辑
export function editInventory(data) {
  return request({
    url: "/apis/smp/smpinventory/editInventory",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}
// 盘点单校验
export function checkStockIsChange(data) {
  return request({
    url: "/apis/smp/smpinventory/checkStockIsChange",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}
